// Copyright (C) 2009, Jackie Ng
// http://code.google.com/p/mgfdo, jumpinjackie@gmail.com
// 
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
// version 2.1 of the License, or (at your option) any later version.
// 
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
// Lesser General Public License for more details.
// 
// You should have received a copy of the GNU Lesser General Public
// License along with this library; if not, write to the Free Software
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
// 
//
// See license.txt for more/additional licensing information

#ifndef MGGETSPATIALCONTEXTSCOMMAND_H
#define MGGETSPATIALCONTEXTSCOMMAND_H

#include "MgProvider.h"
#include "MgConnection.h"
#include "FdoCommonCommand.h"

class MgGetSpatialContexts : public FdoCommonCommand<FdoIGetSpatialContexts, MgConnection>
{
	typedef FdoCommonCommand Parent;

public:
	MgGetSpatialContexts(MgConnection* conn) : Parent(conn), mActiveOnly(false) { }

protected:
	virtual ~MgGetSpatialContexts() { }

private:
	bool mActiveOnly;

public:
    /// \brief
    ///  Gets a Boolean flag that indicates if the GetSpatialContexts command
    /// will return only the active spatial context or all spatial contexts. The
    /// default value of this flag is false, return all spatial contexts.
    /// 
    /// \return
    /// Returns Boolean value
    /// 
	MG_API virtual const bool GetActiveOnly() { return mActiveOnly; }

    /// \brief
    ///  Sets a Boolean flag that indicates if the GetSpatialContexts command
    /// will return only the active spatial context or all spatial contexts. The
    /// default value of this flag is false, return all spatial contexts.
    /// 
    /// \param value 
    /// Input the Boolean flag
    /// 
    /// \return
    /// Returns nothing
    /// 
	MG_API virtual void SetActiveOnly(const bool value) { mActiveOnly = value; }

    /// \brief
    /// Executes the GetSpatialContexts command returning an FdoISpatialContextReader.
    /// 
    /// \return
    /// Returns nothing
    /// 
    MG_API virtual FdoISpatialContextReader* Execute();

};

#endif